package com.axonactive.yolo.service.implement;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.axonactive.yolo.dao.interfaces.TimeStampRepository;
import com.axonactive.yolo.domain.TimeStamp;
import com.axonactive.yolo.service.interfaces.TimeStampService;

@Service
public class TimeStampImpl implements TimeStampService {
	@Resource
	private TimeStampRepository timeStampRepository;
	
	@Transactional
//	@CacheEvict(value = "timeStampCache", beforeInvocation = true)
//	@Cacheable("timeStampCache")
	public TimeStamp getFirst(){
		return timeStampRepository.findAll().get(0);
	}
}
